﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZZT
{
    sealed public class KeyCollection
    {
        static public readonly int Count = 7;

        Pointer pointer;

        internal KeyCollection()
        {
            pointer = new Pointer(Count);
        }

        internal KeyCollection(byte[] memory)
        {
            pointer = new Pointer(memory, 0);
        }

        internal KeyCollection(byte[] memory, int offset)
        {
            pointer = new Pointer(memory, offset);
        }

        public bool this[int index]
        {
            get
            {
                Pointer ptr = pointer.GetRelativePointer(index);
                return ptr.Bool;
            }
            set
            {
                Pointer ptr = pointer.GetRelativePointer(index);
                ptr.Bool = value;
            }
        }
    }
}
